home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / misc / ConfigLib2.readme < prev    next >
Encoding:
Text File  |  1996-10-11  |  2.9 KB  |  65 lines

  1. Short:    Config.library: Easy access to cfg files
  2. Author:   Adam Dawes (Adam@Beachyhd.demon.co.uk)
  3. Uploader: Adam Dawes (Adam@Beachyhd.demon.co.uk)
  4. Type:     dev/misc
  5.  
  6.  
  7. This archive contains config.library, a system to make accessing config
  8. files particularly easy, and all necessary documentation, includes, etc. to
  9. use the library with C and assembly language.
  10.  
  11. This is a revision of my Config system, previously available as sourcecode
  12. in dev/c/Config101.lha. Config.library is completely compatible with the
  13. Config system; existing config files will still work, and the function
  14. names are identical.
  15.  
  16. If anyone is interested in converting the includes and examples to work in
  17. any other languages (Amiga E, BASIC, etc.) then please contact me.
  18.  
  19.  
  20.  
  21. Introduction
  22. ~~~~~~~~~~~~
  23.  
  24. Well, I hate Windows as much as the next man, but occasionally I stumble
  25. across a good idea hidden away within the operating system.
  26.  
  27. There are a couple of functions buried in there for reading and writing
  28. configuration files, and they actually make things very easy. I decided I'd
  29. had enough of messing around with config files on my Amiga, so I've ported
  30. the functions to Amiga C.
  31.  
  32. The idea is that the configuration files take a definitive structure which
  33. the Config functions can understand. Each config file is split in to a
  34. number of "Sections" (which are stored in the config file as a keyword
  35. inside square brackets). In each of these sections are a number of "Items",
  36. each of which contains an actual data item. The items are local to the
  37. section that contains them, so it's perfectly legal to use one item name in
  38. several sections, they'll all be treated separately.
  39.  
  40. The beauty behind the functions is you don't have to worry about creating
  41. files or scanning through them. Even when it comes to reading data, you
  42. don't have to care if the config file exists or not as you provide a
  43. default value to use if the file/section/item cannot be located.
  44. Everything is automated within the Config functions.
  45.  
  46.  
  47. ============================= Archive contents =============================
  48.  
  49. Original  Packed Ratio    Date     Time    Name
  50. -------- ------- ----- --------- --------  -------------
  51.     1980     971 50.9% 07-Sep-96 16:25:50 +ConfigLib2.readme
  52.     4982    1181 76.2% 07-Sep-96 15:17:36 +Config.doc
  53.    11409    4262 62.6% 07-Sep-96 16:11:10 +Config.guide
  54.      566     262 53.7% 07-Sep-96 12:52:58 +config_protos.h
  55.      285     132 53.6% 07-Sep-96 13:01:36 +config.fd
  56.      305     184 39.6% 07-Sep-96 12:54:34 +config.h
  57.      294     179 39.1% 07-Sep-96 15:59:50 +config.i
  58.      325     165 49.2% 07-Sep-96 13:02:52 +config_pragmas.h
  59.      270     185 31.4% 07-Sep-96 12:55:46 +config.h
  60.     2952    1775 39.8% 07-Sep-96 16:04:12 +config.library
  61.     1923     722 62.4% 07-Sep-96 16:07:32 +ConfigTest.s
  62.     3041     748 75.4% 07-Sep-96 16:07:12 +ConfigTest.c
  63. -------- ------- ----- --------- --------
  64.    28332   10766 62.0% 15-Sep-96 19:29:08   12 files
  65.